home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2001 / MacHack 2001.toast / pc / Sessions / Traut / ZStrings / Source / MacOS / GraphicalTool / FileIconPane.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-06-23  |  1.3 KB  |  63 lines

  1. /*==================================================================
  2.     File:        FileIconPane.h
  3.  
  4.     Contains:    Implementation of a simple pane that draws the icon
  5.                 associated with a file (specified as either an IconRef
  6.                 or a color icon ID).
  7.  
  8.     Written by:    Eric Traut
  9.  
  10.     Copyright:    2000-2001 Connectix Corporation
  11.     
  12.     This source has been placed into the public domain by
  13.     Connectix Corporation. You have the right to modify, 
  14.     distribute or use this code without any legal limitations
  15.     or finanicial/licensing requirements. Connectix is not 
  16.     liable for any problems that result from the use of this 
  17.     code.
  18.     
  19.     If you have comments, feedback, questions, or would like
  20.     to submit bug fixes or updates to this code, please email
  21.     opensource@connectix.com.
  22. ==================================================================*/
  23.  
  24.  
  25. #pragma once
  26.  
  27. #include <LPane.h>
  28.  
  29.  
  30. const ResIDT        icon_UnknownFileTypeIcon        = 128;
  31. const ResIDT        icon_HTMLFileTypeIcon            = 129;
  32.  
  33. class FileIconPane : public LPane
  34. {
  35.     public:
  36.         enum { class_ID = FOUR_CHAR_CODE('IRPn') };
  37.  
  38.         FileIconPane(
  39.             LStream *        inStream);
  40.         
  41.         virtual
  42.         ~FileIconPane();
  43.         
  44.         void
  45.         SetIconRef(
  46.             IconRef        inIconRef);
  47.         
  48.         void
  49.         SetIconID(
  50.             ResID        inColorIconID);
  51.         
  52.         void
  53.         DrawSelf();
  54.  
  55.     private:
  56.         IconRef        mIconRef;
  57.         ResID        mIconID;
  58.         Boolean        mUseIconID;
  59. };
  60.  
  61.  
  62.  
  63.